<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<%@include file="../../common.jsp"%>
<head>
	<title>购物车</title>
	<script src="${staticPath}/js/jquery.spinner.js"></script>
	<script src="${staticPath}/js/app/cart/cart.js"></script>
	<script src="${staticPath}/js/app/cart/list.js"></script>
</head>
<body>
<script type="text/javascript">
function showCartsContent(){
	$.showLoading();
	var cartItemsCookie = $.cookie("cartItems");
	if(cartItemsCookie==undefined||"undefined"==cartItemsCookie||cartItemsCookie==null){
		cartItemsCookie="";
	}
	var token = $.cookie("token");
	if(token==undefined||"undefined"==token||token==null){
		token="";
	}
	$.ajax({
		url:appPath+"/cart/listCartItems.html",
		dataType:'html',
		type:'post',
		data:{
			token: token,
			cc:cartItemsCookie
		},
		success:function(newData){
			$.hideLoading();
			var div = $(newData).find("#content_div");
			var appendHtml = $(div[0]).html();
			$('body').append(appendHtml);
			//同步本地cookie
			//$.cookie('cartItems',$("#synchronizeCookieStr").val(), { expires: 7, path: '/' }); 
			readyDo();
		},error:function(){
			$.hideLoading();
			$.alert("系统异常，请重试");
		}
	})
}
showCartsContent();
</script>
</body>
</html>
